<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<artifactId>sample</artifactId>
	<name>Android-ViewPagerIndicator Sample</name>
	<packaging>apk</packaging>

	<parent>
		<groupId>com.viewpagerindicator</groupId>
		<artifactId>parent</artifactId>
		<version>2.4.1</version>
		<relativePath>../pom.xml</relativePath>
	</parent>

	<dependencies>
		<dependency>
			<groupId>com.google.android</groupId>
			<artifactId>android</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>com.google.android</groupId>
			<artifactId>support-v4</artifactId>
		</dependency>

		<dependency>
			<groupId>com.viewpagerindicator</groupId>
			<artifactId>library</artifactId>
			<version>${project.version}</version>
			<type>apklib</type>
		</dependency>
	</dependencies>

	<build>
		<sourceDirectory>src</sourceDirectory>
		<finalName>${project.artifactId}-unaligned</finalName>

		<plugins>
			<plugin>
				<groupId>com.jayway.maven.plugins.android.generation2</groupId>
				<artifactId>android-maven-plugin</artifactId>
				<extensions>true</extensions>
			</plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <configuration>
                    <configLocation>../checkstyle.xml</configLocation>
                </configuration>
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <goals>
                            <goal>checkstyle</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>release</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>com.jayway.maven.plugins.android.generation2</groupId>
						<artifactId>android-maven-plugin</artifactId>
						<version>${android-maven.version}</version>
						<inherited>true</inherited>
						<configuration>
							<zipalign>
								<inputApk>${project.build.directory}/${project.build.finalName}.apk</inputApk>
								<outputApk>${project.build.directory}/${project.artifactId}.apk</outputApk>
							</zipalign>
						</configuration>
						<executions>
							<execution>
								<id>alignApk</id>
								<phase>package</phase>
								<goals>
									<goal>zipalign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
